/**   
* @Title: PreResultAction.java
* @Package com.action.ognl
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com   
* @date 2017年6月24日 下午3:31:33
* @version V1.0   
*/


package com.action.ognl;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
* @ClassName: PreResultAction
* @Description: TODO(处理注册)
* @author antch,861710865@qq.com
* @date 2017年6月24日 下午3:31:33
* 
*/

public class PreResultAction extends ActionSupport {

	/** 
	* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
	*/
	private static final long serialVersionUID = 1L;

	private String username;
	
	private String password;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Override
	public String execute() throws Exception {
		
		System.out.println("用户的输入参数为：：" + username + "," + password);
		 
		ActionContext context = ActionContext.getContext();
		MyPreResultListener preResultListener = new MyPreResultListener();
		//在监听中处理
		context.getActionInvocation().addPreResultListener(preResultListener);
		
		return SUCCESS;
	}
}
